<?php

namespace app\index\controller;

use app\index\model\Banner as BannerModel;
use app\index\model\Config as ConfigModel;
use think\Request;
use app\index\model\Layout as LayoutModel;
use app\index\model\Core as CoreModel;
use app\index\model\Star as StarModel;

class Map extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $banner = BannerModel::getBanner('map');
        $action = $request->action();
        $this->assign('banner', $banner);
        $this->assign('action', $action);
    }

    public function index()
    {
        //全球事业部
        $recommends = LayoutModel::getByRecommend();
        $onlines = LayoutModel::getByOnline();
        //核心人员
        $cores = CoreModel::getByOnline();
        //楼氏之星
        $star = StarModel::getByOnline();
        $years = StarModel::getYear($star);
        $stars = StarModel::getAll($star);
        //标签
//        $tag = ConfigModel::getStarTagValue();

        $this->assign('onlines', $onlines);
        $this->assign('recommends', $recommends);
        $this->assign('cores', $cores);
        $this->assign('stars', $stars);
        $this->assign('years', $years);
//        $this->assign('tag', $tag);
        $this->assign('now', date('Y', time()));
        return $this->fetch();
    }


}
